import Vue from 'vue'
import App from './App.vue'
import router from './router'

Vue.config.productionTip = false

import { 
  Button, 
  Tabbar, 
  TabbarItem,
  Search,
  NoticeBar,
  Swipe,
  SwipeItem,
  Lazyload,
  Sidebar,
  SidebarItem,
  Grid, 
  GridItem,
  Image, 
  Col, 
  Row,
  SwipeCell,
  Card,
  Checkbox,
  Tag,
  PullRefresh,
  List,
  NavBar,
  Icon,
  Form,
  Field,
  GoodsAction, 
  GoodsActionIcon, 
  GoodsActionButton,
  Dialog,
  SubmitBar,
  Cell,
  CellGroup,
	AddressEdit,
	AddressList
} from 'vant'

Vue.use(Button)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(Search)
Vue.use(NoticeBar)
Vue.use(Swipe)
Vue.use(SwipeItem)
Vue.use(Lazyload)
Vue.use(Sidebar)
Vue.use(SidebarItem)
Vue.use(Grid)
Vue.use(GridItem)
Vue.use(Image)
Vue.use(Col)
Vue.use(Row)
Vue.use(SwipeCell)
Vue.use(Card)
Vue.use(Checkbox)
Vue.use(Tag)
Vue.use(PullRefresh)
Vue.use(List)
Vue.use(NavBar)
Vue.use(Icon)
Vue.use(Form)
Vue.use(Field)
Vue.use(GoodsAction)
Vue.use(GoodsActionIcon)
Vue.use(GoodsActionButton)
Vue.use(Dialog)
Vue.use(SubmitBar)
Vue.use(Cell)
Vue.use(CellGroup)
Vue.use(AddressEdit)
Vue.use(AddressList)

// 统一导入访问图片的地址
import img from './utils/imgUrl'
Vue.prototype.$img = img

// 统一导入要请求的api
import api from '@/api'
Vue.prototype.$api = api

// 统一导入相关的弹框的api组件
import dialog from '@/utils/dialog'
Vue.prototype.$dialog = dialog

// 统一导入token值
import verify from '@/utils/verify'
Vue.prototype.$verify = verify


import store from './store/index'
new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
